find the increasing and decreasing function